import javax.swing.undo.AbstractUndoableEdit;
import Factory.CarFactory;
import Factory.Car.CarAbstract;
import java.util.List;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        List<CarAbstract> carList= new ArrayList<CarAbstract>();
        carList.add(CarFactory.getCar("奔驰"));
        carList.add(CarFactory.getCar("奥迪"));
        carList.add(CarFactory.getCar("宝马"));
        for(CarAbstract currentCar : carList){
            System.out.println(currentCar.showInfo());
        }
    }
}
